<script src="vue.js"></script>

<div id="app">
    <my-componnet></my-componnet>
    <my-componnet></my-componnet>
</div>

<script>
    Vue.component("my-componnet",{
        data(){
            return{
                count:0
            }
        },
        template:'<button v-on:click="count++">被点击{{count}}次</button>'
    })
    var vue=new Vue({
        el:'#app'

    })
</script>